<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/18
 * Time: 15:44
 */

if(empty($_GET["id"]))
{
    die("缺少id参数");
}
$id=$_GET["id"];
$sql="delete from production where id=$id";
include dirname(__FILE__) .'../../common/conn.php';
$res=mysqli_query($con,$sql);
mysqli_close($con);
if($res)
{
    echo "<script> {window.alert('删除成功');location.href='list.php'} </script>";
    exit;
}
else
{
    echo "<script> {window.alert('删除失败，请返回重试');location.href='list.php'} </script>";
    exit;
}